home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / misc / vinced / include / vnc / window.h < prev   
C/C++ Source or Header  |  1999-04-19  |  35KB  |  853 lines

  1. #ifndef VNC_WINDOW_H
  2. #define VNC_WINDOW_H
  3. /*********************************************************
  4.  ** ViNCEd                                              **
  5.  ** a DOS - window handler                              **
  6.  **                                                     **
  7.  ** © 1991-98 THOR-Software inc.                        **
  8.  ** Version 3.60                                        **
  9.  **                                                     **
  10.  ** program version 3.60 21 Aug 1998    THOR            **
  11.  **                                                     **
  12.  ** ViNCEd Window: The main structure (ViNCWindow)      **
  13.  **-----------------------------------------------------**
  14.  **                                                     **
  15.  ** all use at your own risk,etc.,etc.                  **
  16.  **                                                     **
  17.  ** Everything declared as "reserved" or                **
  18.  ** "not used" is NOT free for your use,                **
  19.  ** it will propably used in a later release.           **
  20.  ** All FREE entries are free for public                **
  21.  ** use and are, if not otherwise noted,                **
  22.  ** initialized with ZERO                               **
  23.  *********************************************************/
  24.  
  25. #ifndef EXEC_TYPES_H
  26. #include <exec/types.h>
  27. #endif
  28.  
  29. #ifndef EXEC_LIBRARIES_H
  30. #include <exec/libraries.h>
  31. #endif
  32.  
  33. #ifndef EXEC_PORTS_H
  34. #include <exec/ports.h>
  35. #endif
  36.  
  37. #ifndef EXEC_SEMAPHORES_H
  38. #include <exec/semaphores.h>
  39. #endif
  40.  
  41. #ifndef EXEC_IO_H
  42. #include <exec/io.h>
  43. #endif
  44.  
  45. #ifndef EXEC_DEVICES_H
  46. #include <exec/devices.h>
  47. #endif
  48.  
  49. #ifndef DEVICES_TIMER_H
  50. #include <devices/timer.h>
  51. #endif
  52.  
  53. #ifndef DEVICES_CONSOLE_H
  54. #include <devices/console.h>
  55. #endif
  56.  
  57. #ifndef DEVICES_CONUNIT_H
  58. #include <devices/conunit.h>
  59. #endif
  60.  
  61. #ifndef DEVICES_KEYMAP_H
  62. #include <devices/keymap.h>
  63. #endif
  64.  
  65. #ifndef GRAPHICS_CLIP_H
  66. #include <graphics/clip.h>
  67. #endif
  68.  
  69. #ifndef GRAPHICS_GFX_H
  70. #include <graphics/gfx.h>
  71. #endif
  72.  
  73. #ifndef GRAPHICS_RASTPORT_H
  74. #include <graphics/rastport.h>
  75. #endif
  76.  
  77. #ifndef GRAPHICS_TEXT_H
  78. #include <graphics/text.h>
  79. #endif
  80.  
  81. #ifndef UTILITY_TAGITEM_H
  82. #include <utility/tagitem.h>
  83. #endif
  84.  
  85. #ifndef INTUITION_INTUITION_H
  86. #include <intuition/intuition.h>
  87. #endif
  88.  
  89. #ifndef INTUITION_SCREENS_H
  90. #include <intuition/screens.h>
  91. #endif
  92.  
  93. #ifndef DOS_DOS_H
  94. #include <dos/dos.h>
  95. #endif
  96.  
  97. #ifndef DOS_DOSEXTENS_H
  98. #include <dos/dosextens.h>
  99. #endif
  100.  
  101. #ifndef WORKBENCH_WORKBENCH_H
  102. #include <workbench/workbench.h>
  103. #endif
  104.  
  105. #ifndef VNC_VNCBASE_H
  106. #include <vnc/vncbase.h>
  107. #endif
  108.  
  109. #ifndef VNC_PREFS_H
  110. #include <vnc/prefs.h>
  111. #endif
  112.  
  113. #ifndef VNC_OWNER_H
  114. #include <vnc/owner.h>
  115. #endif
  116.  
  117. #ifndef VNC_DYNAMICS_H
  118. #include <vnc/dynamics.h>
  119. #endif
  120.  
  121. #ifndef VNC_KEYBOARD_H
  122. #include <vnc/keyboard.h>
  123. #endif
  124.  
  125.  
  126. /* This is the description of the main structure of ViNCEd, the
  127.    ViNCWindow. It is linked to a group of "owners" that share
  128.    a common output window. This window is described by this structure */
  129.  
  130. struct ViNCWindow {
  131.         struct ViNCWindow       *vcn_succ,*vcn_pred; /* linked list in
  132.                                                         library base */
  133.         UWORD                    vcn_Version;        /* version information */
  134.         UWORD                    vcn_Revision;
  135.         struct SignalSemaphore   vcn_Semaphore;      /* access grant. DO
  136.                                                         NOT TOUCH. Use
  137.                                                         LockWindow(),
  138.                                                         UnLockWindow()! */
  139.         UWORD                    vcn_OpenCount;      /* times DOS Open'd
  140.                                                         this. No lock count,
  141.                                                         no asyncs here */
  142.  
  143. /* base pointers */
  144.         struct VNCBase          *vcn_VNCBase;        /* library base */
  145.         struct ViUserNode       *vcn_UserNode;       /* for you. See below*/
  146.  
  147. /* important flags */
  148.         ULONG                    vcn_Flags;
  149.         ULONG                    vcn_ExtFlags;       /* even more */
  150.         ULONG                    vnc_EventFlags;     /* received events */
  151.         ULONG                    vcn_DOSFlags;       /* much more */
  152.         ULONG                    vcn_RequestedEvents;/* receive which input
  153.                                                         events */
  154.  
  155. /* links to the system */
  156.         struct Window           *vcn_Window;    /* the intuition window,
  157.                                                    if open */
  158.         struct ViNCNewWindow    *vcn_NewWindow; /* temporary for reopen */
  159.         struct RastPort         *vcn_RastPort;  /* private one, for drawing*/
  160.         struct Layer            *vcn_Layer;     /* the layer */
  161.         struct Screen           *vcn_Screen;    /* the screen the window is
  162.                                                    displayed on, if open */
  163.         struct TmpRas           *vcn_TmpRas;    /* used to speedup
  164.                                                    scrolling */
  165.         struct TextFont         *vcn_TextFont;  /* text used for rendering*/
  166.         void                    *vcn_MemPool;   /* ViNCEd's private memory
  167.                                                    pool. Do not touch, THIS
  168.                                                    IS NOT EXEC COMPATIBLE
  169.                                                    Use AllocEdMem(),
  170.                                                    FreeEdMem() to make use
  171.                                                    of this pool */
  172.  
  173.         struct DosList          *vcn_DeviceNode; /* no BPTR! Pointer to
  174.                                                     dos device entry */
  175.  
  176.         struct ConUnit          *vcn_ConUnit;   /* ConUnit for backwards
  177.                                                    compatibility. Do not
  178.                                                    use this. */
  179.  
  180.         struct KeyMap           *vcn_KeyMap;    /* used keyboard. This is
  181.                                                    a console compatible
  182.                                                    keyboard, not the
  183.                                                    VNC extensions */
  184.  
  185.         UWORD                   *vcn_TabStops;  /* array of TAB positions*/
  186.  
  187.  
  188. /* size of window and font */
  189.  
  190.         UWORD                    vcn_TXSize;
  191.         UWORD                    vcn_TYSize;    /* Size of the font */
  192.  
  193.         UWORD                    vcn_TBaseLine; /* text base line */
  194.  
  195.         UWORD                    vcn_TotalCount;/* total open count of
  196.                                                    all structures.
  197.                                                    The handler is allowed
  198.                                                    to leave not until this
  199.                                                    is zero */
  200.         UWORD                    vcn_LeftOffset;/* text starting offset
  201.                                                    in the window */
  202.         UWORD                    vcn_TopOffset; /* same, but vertical */
  203.         UWORD                    vcn_RightOffset;
  204.         UWORD                    vcn_BottomOffset; /* for mini clipping */
  205.  
  206.         UWORD                    vcn_Width;
  207.         UWORD                    vcn_Height;    /* available area for
  208.                                                    drawing in pixels */
  209.  
  210.         UWORD                    vcn_CWidth;
  211.         UWORD                    vcn_CHeight;   /* same in characters */
  212.  
  213.         UWORD                    vcn_BProtLeft;
  214.         UWORD                    vcn_BProtTop;
  215.         UWORD                    vcn_BPropRight;
  216.         UWORD                    vcn_BPortBottom;
  217.                                                 /* border protection
  218.                                                    zone, used to avoid
  219.                                                    printing of italics
  220.                                                    into the border */
  221.         UWORD                    vcn_RightScroll;
  222.         UWORD                    vcn_LeftScroll;/* scrolling margins*/
  223.  
  224.  
  225. /* system lists. None of these lists should be used directly. Use the
  226.    library functions to modify them. */
  227.  
  228.         struct MinList           vcn_reservedlist; /* not yet used */
  229.         struct MinList           vcn_MemBlockList; /* dynamic memory pool*/
  230.         struct MinList           vcn_InputBList;   /* history */
  231.         struct MinList           vcn_ButtonList;   /* buttons */
  232.         struct MinList           vcn_ReceivedReads;/* Read() pkt's Q here */
  233.         struct MinList           vcn_ReceivedWrites;/* Write()'s Q here */
  234.         struct MinList           vcn_OwnerList;    /* list of owners, i.e.
  235.                                                       named consoles.
  236.                                                       !WARNING! Semaphore
  237.                                                       protected! DO NOT
  238.                                                       TOUCH! LockWindow()
  239.                                                       is NOT ENOUGH here! */
  240.         struct MinList           vcn_UpperLineList;/* upper lines */
  241.         struct MinList           vcn_LowerLineList;/* lower lines */
  242.         struct MinList           vcn_Spare2List;   /* also free */
  243.         struct MinList           vcn_HookList;     /* window wide hooks,
  244.                                                       to be removed... */
  245.         struct MinList           vcn_MacroList;    /* user macros */
  246.  
  247. /* position of window & cursor */
  248.  
  249.         UWORD                    vcn_CursorX;
  250.         UWORD                    vcn_CursorY;      /* cursor position */
  251.         UWORD                    vcn_ScrollX;      /* horizontal scrolling */
  252.         UWORD                    vcn_GfxScrollX;   /* and what's seen on
  253.                                                       the screen */
  254.  
  255.         UWORD                    vcn_SearchX;      /* private for history
  256.                                                       searching */
  257.         UWORD                    vcn_DOSX;         /* DOS cursor location for
  258.                                                       mask input hack */
  259.  
  260.         UBYTE                    vcn_RefreshBits; /* window refresh mode,
  261.                                                      see below */
  262.         UBYTE                    vcn_RefreshCounter;/* times the refresh
  263.                                                       was requested */
  264.         UWORD                    vcn_DeltaScroll;   /* amount of lines
  265.                                                       scrolled while output
  266.                                                       disabled */
  267.         UWORD                    vcn_BlockX;
  268.         UWORD                    vcn_BlockY;  /* position of end of block */
  269.  
  270.         UWORD                    vcn_MenuNumber; /* menu selected last */
  271.         UWORD                    vcn_MenuQualifier; /* last menu qualifier */
  272.  
  273.         struct Gadget           *vcn_PressedGadget; /* gadget hold down, or
  274.                                                       NULL */
  275.  
  276. /* colors and types. All come in packed version, see vnc/dynamics.h */
  277.  
  278.         UBYTE                    vcn_ActualLineType; /* copy of cur. line */
  279.         UBYTE                    vcn_ActualLineMask; /* bitplane mask */
  280.  
  281.         UBYTE                    vcn_ActualPenPair; /* colors and */
  282.         UBYTE                    vcn_ActualType;    /* draw mode, packed*/
  283.  
  284.         UBYTE                    vcn_UserPenPair;
  285.         UBYTE                    vcn_UserType;   /* input style characters*/
  286.  
  287.         UBYTE                    vcn_DOSPenPair;
  288.         UBYTE                    vcn_DOSType;    /* dos (output) char's */
  289.  
  290.         UBYTE                    vcn_BackFillPenPair;
  291.         UBYTE                    vcn_BackFillType;  /* only BPen used */
  292.  
  293.         UBYTE                    vcn_PlaneMaskPenPair;
  294.         UBYTE                    vcn_PlaneMaskType;
  295.                                         /* used for concurrent mode */
  296.  
  297. /* actual lines, in the screen and in the buffer,
  298.    line pointers, get adjusted if lines move in memory.
  299.    See dynamics.h */
  300.  
  301.         struct DynLine          *vcn_ActualLine; /* or NULL */
  302.         struct DynLine          *vcn_ActualInput; /* current history line */
  303.         struct DynLine          *vcn_LinePtr;    /* general purpose
  304.                                                    auto adjust pointer */
  305.         struct DynLine          *vcn_AnchorLine; /* for block marking */
  306.  
  307.         UWORD                    vcn_ActualY;    /* position of line in
  308.                                                    buffer */
  309.         UWORD                    vcn_AnchorLineX;/* reserved */
  310.         UWORD                    vcn_AnchorX;
  311.         UWORD                    vcn_AnchorY;    /* anchor position of
  312.                                                    current block */
  313.  
  314. /* line counters and thresholds */
  315.         UWORD                    vcn_InpCount;  /* current size of history */
  316.         UWORD                    vcn_InpMax;    /* maximal size of history */
  317.  
  318.         UWORD                    vcn_UpperCount;
  319.         UWORD                    vcn_UpperMax;   /* same for upper lines */
  320.  
  321.         UWORD                    vcn_LowerCount;
  322.         UWORD                    vcn_LowerMax;   /* same for lower lines */
  323.  
  324.  
  325. /* internal buffers and their size */
  326.         struct  VCharLine       *vcn_EditBuffer; /* contains current line */
  327.         char                    *vcn_SearchBuffer; /* for history search */
  328.         char                    *vcn_RawKeyBuffer; /* for RawKeyConvert */
  329.  
  330. /* additional flags */
  331.         ULONG                    vcn_MoreFlags;  /* even more flags */
  332.         ULONG                    vcn_MoreDOSFlags; /* unused */
  333.         ULONG                    vcn_MoreExtFlags; /* unused */
  334.         ULONG                    vcn_obsolete1;
  335.  
  336. /* more buffers and buffer support */
  337.         char                    *vcn_CutBuffer;  /* actually, the Yank buffer
  338.                                                     for ^K, ^Y */
  339.         char                    *vcn_CommandBuffer; /* reserved */
  340.         char                    *vcn_WindowTitle;   /* untranslated */
  341.         char                    *vcn_ScreenTitle;   /* untranslated */
  342.         char                    *vcn_PubScreenName; /* like it says */
  343.  
  344.         char                    *vnc_ProjectName;   /* last name used for
  345.                                                        open or empty string
  346.                                                        256 bytes long */
  347.         char                    *vcn_HistoryName;   /* last name used
  348.                                                        for the history.
  349.                                                        open or empty string
  350.                                                        256 bytes long */
  351.         struct Message          *vcn_CurrentSnip;   /* snip in progress. Private */
  352.         struct DynLine          *vcn_TABLinePtr;    /* strictly for the TABHook */
  353.  
  354.         struct ViNCExtMap       *vcn_ExtKeyMap;     /* the extended keymap
  355.                                                        definition */
  356.         void                    *vcn_KeymapThread;  /* the keyboard parser
  357.                                                        thread for user
  358.                                                        input */
  359.         void                    *vcn_InputThread;   /* the keyboard parser
  360.                                                        thread for parsing
  361.                                                        external data */
  362.         void                    *vcn_MacroThread;   /* keyboard parser
  363.                                                        thread for expanding
  364.                                                        macros */
  365.  
  366.         char                    *vcn_reserved[2];
  367.  
  368.         UWORD                    vcn_EditSize; /* contents of the EditBuffer */
  369.         UWORD                    vcn_SearchSize; /* private for history */
  370.         UWORD                    vcn_RawKeySize; /* cached keystrokes */
  371.         UWORD                    vcn_DOSSize;    /* obsolete */
  372.         UWORD                    vcn_ASCSize;    /* obsolete */
  373.         UWORD                    vcn_CutSize;
  374.  
  375.  
  376. /* ports, iorequests and signal masks */
  377.  
  378.         struct MsgPort         *vcn_WindowPort; /* not IDCMP, private!*/
  379.         ULONG                    vcn_WindowSignalMask;
  380.  
  381.         struct MsgPort          *vcn_DOSPort;    /* port of NULL owner */
  382.         ULONG                    vcn_DOSSignalMask;
  383.  
  384.         struct MsgPort          *vcn_IOPort;     /* generic port for
  385.                                                    IO interaction */
  386.         ULONG                    vcn_IOSignalMask;
  387.  
  388.         struct IOStdReq         *vcn_ConsoleIO; /* for console IO */
  389.         struct timerequest      *vcn_TimerIO;
  390.         struct IOStdReq         *vcn_InputIO;
  391.         struct IOStdReq         *vcn_UserIORequest;
  392.                                         /* given to user by dos packet
  393.                                            for pseudo communication
  394.                                            with the console device.
  395.                                            Should not be relied on. */
  396.  
  397. /* colors and more. Added in V2.36 */
  398.  
  399.         UBYTE                    vcn_MenuDetailPen;
  400.         UBYTE                    vcn_MenuBlockPen;
  401.  
  402.         UBYTE                    vcn_GlobalRasterMask;
  403.                                         /* used to speed up drawing */
  404.  
  405.         UBYTE                    vcn_GlobalInvertMask;
  406.                                         /* used to draw the cursor */
  407.  
  408. /* gadgets and more. Please do not touch - these aren't the
  409.    actual gadgets if boopsis are available! */
  410.  
  411.         struct Gadget           *vcn_PropXGadget;
  412.         struct Gadget           *vcn_PropYGadget;
  413.         struct Gadget           *vcn_CommandGadget;     /* reserved */
  414.  
  415.         struct Menu             *vcn_Menu;      /* the menu in the window */
  416.  
  417.         void                    *vcn_MenuRemember;
  418.                               /* memory management for menu structs,
  419.                                  ViNCEd internal, NOT INTUITION COMPATIBLE */
  420.  
  421. /* link to the dos */
  422.  
  423.         struct DosPacket        *vcn_ActualDP;  /* packet in action */
  424.         ULONG                    vcn_longreserved;
  425.  
  426.         struct ViOwner          *vcn_ActualOwner; /* in foreground */
  427.         struct ViOwner          *vcn_BREAKOwner;  /* ^C whom ? */
  428.         struct ViOwner          *vcn_OpenOwner;   /* opened this window */
  429.  
  430. /* added these in 2.00 */
  431.  
  432.         struct DynLine          *vcn_DOSLine;   /* dos set cursor here */
  433.  
  434.         UWORD                    vcn_KeepOpenCounter;
  435.                                         /* window iconification forbid */
  436.         UWORD                    vcn_counterreserved;
  437.  
  438. /* added in 2.41 */
  439.  
  440.         UWORD                    vcn_TopRows;
  441.         UWORD                    vcn_BottomRows;
  442.                                         /* scrolling borders, CSI R */
  443.  
  444.         UWORD                    vcn_LeftColumns;
  445.         UWORD                    vcn_RightColumns;  /* not yet used */
  446.  
  447.         UWORD                    vcn_ItalicLeft;
  448.         UWORD                    vcn_ItalicRight;
  449.                                         /* additional room for
  450.                                            italic characters */
  451.  
  452. /* io requests for delay */
  453.  
  454.         struct timerequest      *vcn_PrivateTimerIO;/* intuition delay */
  455.         struct timerequest      *vcn_DelayTimerIO;  /* for refresh */
  456.         struct timerequest      *vcn_ScrollTimerIO; /* for scrolling */
  457.         struct timerequest      *vcn_BlinkTimerIO;  /* for cursor blinking */
  458.  
  459. /* delay times in micros, see prefs.h */
  460.  
  461.         ULONG                    vcn_DelayMicros;
  462.         ULONG                    vcn_RebuildMicros;
  463.         ULONG                    vcn_SlowMicros;
  464.         ULONG                    vcn_BlinkMicros;
  465.  
  466. /* time stamp the gadget was pressed down */
  467.  
  468.         struct timeval           vcn_TimeDown;
  469.  
  470. /* added in 3.00 */
  471.  
  472.         UWORD                    vcn_SelectedLeftOffset;
  473.         UWORD                    vcn_SelectedTopOffset;
  474.         UWORD                    vcn_SelectedWidth;
  475.         UWORD                    vcn_SelectedHeight;
  476.                                 /* borders set by CBM CSI sequences */
  477.  
  478. /* even more gadgets. DO NOT TOUCH! These aren't the actual gadgets
  479.    if boopsis are available ! */
  480.  
  481.         struct Gadget           *vcn_LeftGadget;
  482.         struct Gadget           *vcn_RightGadget;
  483.         struct Gadget           *vcn_UpGadget;
  484.         struct Gadget           *vcn_DownGadget; /* arrows */
  485.  
  486.         struct Gadget           *vcn_IconicGadget; /* iconification */
  487.  
  488.         struct Gadget           *vcn_FirstVNCGadget;
  489.                                         /* first private gadget added to
  490.                                            the window */
  491.         UWORD                    vcn_ViNCNumGads; /* number of gad's added */
  492.         UWORD                    vcn_ViNCGadPos;  /* at which position ?*/
  493.  
  494. /* dimensions of the sizing gadgets and arrows... */
  495.  
  496.         UWORD                    vcn_HorWidth;
  497.         UWORD                    vcn_HorHeight;
  498.         UWORD                    vcn_VertWidth;
  499.         UWORD                    vcn_VertHeight; /* arrow gadgets */
  500.  
  501.         UWORD                    vcn_SizingWidth; /* dimension of the */
  502.         UWORD                    vcn_SizingHeight;/* system sizing gadget */
  503.  
  504.         UWORD                    vcn_IconicWidth; /* dimension of the */
  505.         UWORD                    vcn_IconicHeight;/* iconification gadget */
  506.  
  507.         UWORD                    vcn_LeftTitle;  /* free position near close */
  508.  
  509.         UWORD                    vcn_LeftButton; /* left edge of leftmost
  510.                                                     button, relative to
  511.                                                     rightmost edge */
  512.  
  513.         UWORD                    vcn_CloseWidth; /* width of the close
  514.                                                    gadget */
  515.  
  516.         UWORD                    vcn_DimReserved;
  517.  
  518.  
  519. /* Stuff needed for iconification */
  520.  
  521.         struct DiskObject       *vcn_IconicDOP; /* icon for iconification */
  522.         struct AppIcon          *vcn_AppIcon;   /* the code we got from WB */
  523.         UBYTE                    vcn_IconicCode;/* internal use... */
  524.         UBYTE                    vcn_IconcRes[3]; /* reserved */
  525.         char                    *vcn_IconTitle; /* the title, untranslated */
  526.  
  527. /* complete (unpacked) colors */
  528.  
  529.         UBYTE                    vcn_UserExtAPen;
  530.         UBYTE                    vcn_UserExtBPen; /* user input colors */
  531.         UBYTE                    vcn_UserExtMode;
  532.         UBYTE                    vcn_UserExtReserved;
  533.  
  534.         UBYTE                    vcn_DOSExtAPen;
  535.         UBYTE                    vcn_DOSExtBPen;
  536.         UBYTE                    vcn_DOSExtMode; /* same for output */
  537.         UBYTE                    vcn_DOSExtReserved;
  538.  
  539.         UBYTE                    vcn_BackExtAPen; /* unused */
  540.         UBYTE                    vcn_BackExtBPen; /* backfill pen */
  541.         UBYTE                    vcn_BackExtMode; /* unused */
  542.         UBYTE                    vcn_BackExtReserved;
  543.  
  544. /* colors for rendering. Used by ViNCEd and SetVNC */
  545.  
  546.         UBYTE                    vcn_LightColor; /* shine pen */
  547.         UBYTE                    vcn_DarkColor;  /* shadow pen */
  548.         UBYTE                    vcn_FillColor;  /* background. =0 */
  549.         UBYTE                    vcn_TextColor;  /* used for text */
  550.         UBYTE                    vcn_MarkColor;  /* special text */
  551.         UBYTE                    vcn_ArrowColor; /* colors of arrows */
  552.         UBYTE                    vcn_ArrowLight;
  553.         UBYTE                    vcn_ArrowDark; /* usually shine & shadow
  554.                                                    but not in 1.2/1.3 */
  555.         UBYTE                    vcn_FillTextColor; /* text in the bar */
  556.         UBYTE                    vcn_reservedCols[3];
  557.  
  558. /* even more master pointers for the DynLines. Get relocated if
  559.    lines move. For private use only! */
  560.  
  561.         struct DynLine          *vcn_LinePtrA;
  562.         struct DynLine          *vcn_LinePtrB;
  563.         struct DynLine          *vcn_LinePtrC;
  564.  
  565. /* screen support */
  566.  
  567.         ULONG                    vcn_ScreenSignalMask;
  568.         UBYTE                    vcn_ScreenSignalBit; /* for pubscreen
  569.                                                         close */
  570.         UBYTE                    vcn_ScreenRes[3];
  571.  
  572.         struct Screen           *vcn_PubScreen; /* our public screen again,
  573.                                                    if open */
  574.         struct TextAttr          vcn_PrivAttr;  /* not used, but reserved */
  575.  
  576.         struct ViNCNewWindow    *vcn_LastNewWindow;
  577.                                                 /* used for re-opening */
  578.  
  579. /* final (ready for use) titles after translation */
  580.  
  581.         char                    *vcn_FinalTitle;
  582.         char                    *vcn_FinalScreenTitle;
  583.         char                    *vcn_FinalIconTitle;
  584.  
  585. /* again screen support */
  586.  
  587.         ULONG                    vcn_DefaultModeID; /* for screens */
  588.         struct ViColorEntry      vcn_Colors[16];    /* current colors */
  589.  
  590.  
  591. /* TABHook support */
  592.  
  593.         struct MsgPort          *vcn_TABHookPort;   /* for communications
  594.                                                        with the ViNCFiler */
  595.         UWORD                    vcn_CacheCount;    /* directories cached */
  596.         UWORD                    vcn_CacheMax;      /* max. cache size */
  597.         ULONG                    vcn_TABreserved2;
  598.  
  599.         struct timeval           vcn_TABTime;   /* time of last TAB */
  600.         ULONG                    vcn_TABFlags;  /* private flags for
  601.                                                    the TABHook */
  602.         struct MinList           vcn_TABExpansionList; /* what has been
  603.                                                          found */
  604.         void                    *vcn_TABCurrentNode;
  605.                                                 /* do not care about it */
  606.  
  607.         struct ViOwner          *vcn_TABOwner;  /* who pressed TAB ?*/
  608.  
  609.         UWORD                    vcn_TABLineLen;
  610.         UWORD                    vcn_TABCursorPos; /* and where ?*/
  611.  
  612.         char                    *vcn_TABPatBuf; /* expanded pattern. */
  613.         char                    *vcn_TABRemainder; /* rest of the line */
  614.  
  615.         UWORD                    vcn_GluePos; /* where to glue in again */
  616.         UWORD                    vcn_ArgNum; /* which argument to expand */
  617.         UWORD                    vcn_PatPos; /* where's #? ?*/
  618.         UWORD                    vcn_TABReserved;
  619.  
  620.         struct AppWindow        *vcn_AppWindow; /* for icon drop */
  621.         BPTR                     vcn_TABLock;   /* expansion list is
  622.                                                    relative to this one */
  623.  
  624.         UWORD                    vcn_PathOnlyQualifier;
  625.         UWORD                    vcn_NameOnlyQualifier;
  626.  
  627. /* more color support, version 3.33 and up */
  628.  
  629.         UBYTE                   *vnc_ANSIPenColors;/* 16 for the pens, 16
  630.                                                      for the block hilite */
  631.         UBYTE                   *vcn_ANSIAlloc;    /* Each byte for an
  632.                                                       allocated pen */
  633. /* default pens saved with CSI SPC s */
  634.  
  635.         UBYTE                   vcn_DefaultExtAPen;
  636.         UBYTE                   vcn_DefaultExtBPen;
  637.         UBYTE                   vcn_DefaultExtMode;
  638.         UBYTE                   vcn_DefaultExtReserved;
  639.  
  640. /* default colors */
  641.  
  642.         struct ViColorEntry     vcn_DefaultColors[16];
  643.         struct ViColorEntry     vcn_CursorColor;
  644.         struct ViColorEntry     vcn_DefaultCursorColor;
  645.  
  646. /* TAB expansion priorities */
  647.  
  648.         struct ViTabPriors      vcn_ActivePrioSet;      /* currently used.
  649.                                                            copied over on
  650.                                                            expansion */
  651.         struct ViTabPriors      vcn_TABPriors[6];       /* priority set */
  652.  
  653.         /* private fields beyond this point, do not read! */
  654. };
  655.  
  656. /* The next node is definitly for your private use! ViNCEd does not
  657.    touch it, except for one line master pointer that gets adjusted if
  658.    the line moves... */
  659.  
  660. /* Valid flags in vcn_Flags can be found in vpf_Flags, see Prefs.h.
  661.    Same goes for vcn_DOSFlags.
  662.    ExtFlags are for internal use. Not documented cause they will
  663.    change in the future.... */
  664.  
  665. /* Refresh modes... */
  666.  
  667. /* horizontal line */
  668. #define VCNR_HOR_BIT    0
  669.  
  670. /* vertical screen */
  671. #define VCNR_VERT_BIT   1
  672.  
  673. /* total refresh */
  674. #define VCNR_TOTAL_BIT  2
  675.  
  676. /* layer must be refreshed */
  677. #define VCNR_LAYER_BIT  3
  678.  
  679. /* currently refreshing */
  680. #define VCNR_REFRESHING_BIT 6
  681.  
  682. /* masking forbidden, gets calculated */
  683. #define VNCR_FULLMASK_BIT 7
  684.  
  685.  
  686. struct ViUserNode {
  687.         struct ViNCWindow       *ucn_Window; /* points back to structure
  688.                                                 above */
  689.  
  690.         struct VNCBase          *ucn_LibBase; /* library base */
  691.  
  692.         struct DynLine          *ucn_UserLinePtr; /* gets updated.
  693.                                                      Keep line ptrs
  694.                                                      here! */
  695.  
  696.         ULONG                    ucn_UserData;
  697.         void                    *ucn_UserPtr;
  698.  
  699.         struct List              ucn_UserList;  /* Not initialized! */
  700.  
  701.         UWORD                    ucn_UserReserved; /* don't touch this! */
  702.         UWORD                    ucn_UserCount;
  703.  
  704.         UWORD                    ucn_UserX;
  705.         UWORD                    ucn_UserY;
  706. };
  707.  
  708.  
  709.  
  710.  
  711.  
  712. /* The next one is used for OpenAWindow(), to attach an intuition window
  713.    to a ViNCWindow */
  714.  
  715. struct ViNCNewWindow {
  716.         WORD                     vnw_LeftEdge;
  717.         WORD                     vnw_TopEdge; /* position. Set top to -1
  718.                                                  to adjust to drag bar */
  719.         WORD                     vnw_Width;
  720.         WORD                     vnw_Height; /* size. Set to -1 to get
  721.                                                 maximal size */
  722.  
  723.         UBYTE                    vnw_Pens[2]; /* reserved. Must be -1,-1 */
  724.  
  725.         ULONG                    vnw_ViNCFlags; /* see below. No IDCMP! */
  726.  
  727.         /* note that no IDCMP flags are here! ViNCEd does not use the
  728.            IDCMP, instead an input handler is used ! */
  729.  
  730.         ULONG                    vnw_WindowFlags;
  731.                                                 /* passed to intuition as
  732.                                                    window flags */
  733.         WORD                     vnw_AltLeftEdge;
  734.         WORD                     vnw_AltTopEdge;
  735.         WORD                     vnw_AltWidth;
  736.         WORD                     vnw_AltHeight; /* alternate position */
  737.  
  738.         char                    *vnw_Title;     /* title of the screen,
  739.                                                    including control code */
  740.         void                    *vnw_Screen;    /* pointer to intuition
  741.                                                    screen, or name of
  742.                                                    public screen */
  743.         struct BitMap           *vnw_BitMap;    /* for superbitmaps.
  744.                                                    Works, but not
  745.                                                    recommended */
  746.  
  747.         WORD                     vnw_MinWidth,vnw_MinHeight;
  748.         WORD                     vnw_MaxWidth,vnw_MaxHeight;
  749.                                                 /* set to -1,-1 for maximal
  750.                                                    dimension! */
  751.  
  752.         UWORD                    vnw_Type;      /* window type.
  753.                                                    See below. */
  754.         struct TagItem          *vnw_Tags;      /* expand on your own,
  755.                                                    passed to intuition */
  756.  
  757.         struct Window           *vnw_UserWindow;
  758.                                                 /* set to install in own
  759.                                                    window */
  760.  
  761.         char                    *vnw_ScreenTitle;
  762.  
  763.         ULONG                    vnw_MonitorID; /* for private screens */
  764.         UWORD                    vnw_Depth;     /* for depth of screen */
  765.  
  766.         UBYTE                    vnw_Cols,vnw_Rows;
  767.                                         /* dimensions in characters, if
  768.                                            not zero */
  769.  
  770.         struct TextFont         *vnw_TextFont;
  771.                                         /* Text Font to use */
  772. };
  773.  
  774. /* Useful screen types */
  775.  
  776. /* open on workbench or on ViNCEd screen (set proper flags, see below) */
  777. #define VNW_STYPE_WORKBENCH     1
  778.  
  779. /* open on custom screen */
  780. #define VNW_STYPE_CUSTOM        15
  781. /* vnw_Screen is a pointer to struct Screen */
  782.  
  783. /* open on public screen */
  784. #define VNW_STYPE_PUBLIC        2
  785. /* vnw_Screen is a pointer to char *, containing the name of
  786.    the screen to open the window on */
  787.  
  788.  
  789. /* Add the standard menu */
  790. #define VNW_ADDMENU_BIT         30
  791. #define VNW_ADDMENU_MASK        (1L<<30)
  792.  
  793. /* Add X prop gadget */
  794. #define VNW_ADDPROPX_BIT        29
  795. #define VNW_ADDPROPX_MASK       (1L<<29)
  796.  
  797. /* Add Y prop gadget */
  798. #define VNW_ADDPROPY_BIT        28
  799. #define VNW_ADDPROPY_MASK       (1L<<28)
  800.  
  801. /* Fall back to WB if custom/public screen not available */
  802. #define VNW_PUBFALLBACK_BIT     27
  803. #define VNW_PUBFALLBACK_MASK    (1L<<27)
  804.  
  805. /* screen title available */
  806. #define VNW_WITHTITLE_BIT       26
  807. #define VNW_WITHTITLE_MASK      (1L<<26)
  808.  
  809. /* chunky graphics ? This means that ViNCEd should not try to use
  810.    graphics output optimizations. It will be usually smart enough
  811.    not to turn them on on chunky screens anyways. */
  812. #define VNW_CHUNKYPIXEL_BIT     25
  813. #define VNW_CHUNKYPIXEL_MASK    (1L<<25)
  814.  
  815. /* shell window ? */
  816. #define VNW_SHELL_BIT           24
  817. #define VNW_SHELL_MASK          (1L<<24)
  818.  
  819. /* add buttons ? */
  820. #define VNW_ADDBUTTONS_BIT      23
  821. #define VNW_ADDBUTTONS_MASK     (1L<<23)
  822.  
  823. /* add iconify ? */
  824. #define VNW_ADDICONIC_BIT       22
  825. #define VNW_ADDICONIC_MASK      (1L<<22)
  826.  
  827. /* open on own screen? Set type to VNW_STYPE_WORKBENCH in this case */
  828. #define VNW_PRIVSCREEN_BIT      21
  829. #define VNW_PRIVSCREEN_MASK     (1L<<21)
  830.  
  831. /* remove dragbar ?*/
  832. #define VNW_NODRAGBAR_BIT       20
  833. #define VNW_NODRAGBAR_MASK      (1L<<20)
  834.  
  835. /* keep user window open ?*/
  836. #define VNW_KEEPOPEN_BIT        19
  837. #define VNW_KEEPOPEN_MASK       (1L<<19)
  838.  
  839. /* install ANSI colors ?*/
  840. #define VNW_ANSIMODE_BIT        18
  841. #define VNW_ANSIMODE_MASK       (1L<<18)
  842.  
  843. /* open window pre-iconified ?*/
  844. #define VNW_ICONIFIED_BIT       17
  845. #define VNW_ICONIFIED_MASK      (1L<<18)
  846.  
  847. /* Unlike with intuition windows, this structure MUST stay
  848.    constant until the ViNCEd stream is closed down since
  849.    it may happen that ViNCEd has to re-open the window. */
  850.  
  851. #endif
  852.  
  853.